package com.ljc.cjgl.repository;

import java.util.List;
import java.util.Optional;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.ljc.cjgl.entitiy.Student;
@Repository
public interface StudentRepository extends JpaRepository<Student, Integer>, JpaSpecificationExecutor<Student> {
	@Query("from Student t where t.tbClass.id=?1 order by t.stuNum")
	public List<Student> findByTbClassId(Integer id);

	public Optional<Student> findBySaveName(String uid);

	public List<Student> findByStuNumAndPwd(String userName, String pwd);

	

}
